// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import ElementUI from 'element-ui' 
import 'element-ui/lib/theme-chalk/index.css' 
import'./rem'
import weui from 'weui.js'
import 'weui'
import Vuex from 'vuex'
import store from './vuex/store'
import util from './assets/util/util'
import './assets/css/custom.css'
import {post, fetch, patch, put} from "./assets/util/http.js"
import $ from 'jquery'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
//mint-ui
import Mint from 'mint-ui'
import 'mint-ui/lib/style.css'
import { MessageBox } from 'mint-ui'

import net from '@/constants/Net.constants'//赋值全局常量


Vue.use(VueQuillEditor)
Vue.use(Mint)
Vue.use(Vuex)
Vue.use(ElementUI);

Vue.prototype.NET = net
Vue.prototype.$weui = weui
Vue.prototype.$util = util
Vue.prototype.$store = store
//把axios对象挂到Vue实例上面，其他组件在使用axios的时候直接 this.$http就可以了 
Vue.prototype.$axios = axios
Vue.prototype.$post = post;
Vue.prototype.$fetch = fetch;
Vue.prototype.$patch = patch;
Vue.prototype.$put = put;
//mint-ui功能
Vue.prototype.$messagebox = MessageBox;

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
	model: 'hash',
	el: '#app',
	router,
	components: {
		App
	},
	created(){
		if(localStorage.getItem("isLogin") === null){
			localStorage.setItem("isLogin",'');
		}
		this.$store.isLogin = localStorage.getItem('isLogin');
	},
	template: '<App/>'
})